#include "returnstatus.h"
#include <QApplication>
#include <QDebug>

ReturnStatus::ReturnStatus(QObject *parent) :
    QObject(parent)
{
}

void ReturnStatus::returnOk()
{
    QApplication::exit(0);
}

void ReturnStatus::returnCancel()
{
    QApplication::exit(1);
}

void ReturnStatus::returnHelp()
{
    QApplication::exit(2);
}

void ReturnStatus::returnPrevious()
{
    QApplication::exit(3);
}

void ReturnStatus::returnError()
{
    QApplication::exit(255);
}

void ReturnStatus::returnString(QString str)
{
    QTextStream cout(stdout, QIODevice::WriteOnly);
    cout << str;
    QApplication::exit(0);
}
